﻿//
// Copyright (c) 2019-2023 BPer
//
#ifndef BPERTHREAD1_H
#define BPERTHREAD1_H


#include <bperutil/buffer/BPerVideoBuffer.h>
#include <bperutil/sys/BPerThread2.h>

#include <bperstream/BPerSynBuffer.h>

class BPerRecordThread : public BPerThread
{
public:
    BPerRecordThread();
    virtual ~BPerRecordThread();

    int m_isLoop;
    void initPara();

    BPerSynBuffer* m_syn;
    bool m_isRender;

    int m_sid;
    void stopAll();
    int showType;

    void setBlackBk();

private:
    void render();
    void closeAll();

    BPerFrame m_frame;
    int m_isStart;
    int m_playWidth;
    int m_playHeight;
    uint8_t* m_playBuffer;

public:
    void stop();
protected:
     void run();
};

#endif // BPERTHREAD_H
